package com.wangx1n.bean;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author WangXin
 * @date 2020/12/3 14:03
 */
public class MyBean implements FactoryBean<Person>{

    //定义返回bean
    @Override
    public Person getObject() throws Exception {
        Person person = new Person();
        person.setName("namo");
        return person;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
